module.exports = {
  extends: ["@commitlint/config-conventional"],
  prompt: {
    settings: {
      enableMultipleScopes: true
    },
    message: {
      skip: ":skip", // 可以通过输入跳过该字段
      max: "最大 %d 字符", // 最大字符数
      min: "%d 最小字符",
      emptyWarning: "不能提交空的!!",
      upperLimitWarning: "超出字符限制!!!!!",
      lowerLimitWarning: "字符小于下限!!!!"
    },
    questions: {
      type: {
        description: "Commit 提交类型",
        enum: {
          feat: {
            description: "新功能",
            title: "新功能",
            emoji: "✨"
          },
          fix: {
            description: "修复bug",
            title: "码主保佑,永无bug",
            emoji: "🙏"
          },
          refactor: {
            description: "代码重构",
            title: "refactor",
            emoji: "😒"
          },
          pref: {
            description: "更改代码,提高性能",
            title: "pref",
            emoji: "🚀"
          },
          chore: {
            description: "不属于以上类型",
            title: "chore",
            emoji: "💐"
          },
          test: {
            description: "测试用例",
            title: "test",
            emoji: "🔗"
          },
          docs: {
            description: "文档增删",
            title: "docs",
            emoji: "📒"
          },
          style: {
            description: "编码样式修改",
            title: "style",
            emoji: "💎"
          },
          ci: {
            description: "CI集成",
            title: "CI",
            emoji: "⚙️"
          },
          build: {
            description: "修改构建系统",
            title: "build",
            emoji: "📦"
          }
        }
      },
      scope: {
        description: "要更改的范围?（组件或文件名)"
      },
      subject: {
        description: "写一个简短的，命令式的变化描述"
      },
      body: {
        description: "提供更改的更长描述"
      },
      isBreaking: {
        description: "有什么重大变化吗?"
      },
      breakingBody: {
        description: "重大更改提交需要一个主体。请输入提交本身的更长描述"
      },
      breaking: {
        description: "描述突变"
      },
      isIssueAffected: {
        description: "此更改是否影响任何未决问题?"
      },
      issuesBody: {
        description:
          "如果问题被关闭，提交需要一个主体。请输入提交本身的更长描述"
      },
      issues: {
        description: '添加问题引用 (例如 "fix #123", "re #123".)'
      }
    }
  }
}
